package com.gitee.wsl.ext.collection


/**
 * @return [this] sequence where the second element of each pair is not `null`
 */
@Suppress("UNCHECKED_CAST")
fun <A, B> Sequence<Pair<A, B?>>.filterNotNullValues(): Sequence<Pair<A, B>> {
    return this.filter { it.second != null } as Sequence<Pair<A, B>>
}